package com.ruoyi.common.enums;

import lombok.Getter;

@Getter
public enum TeacherApplicationStatusEnums {
    ADMIN_APPLICATION("待管理员审核" ,"ADMIN_APPLICATION") ,
    APPLICATION_SUCCESS("审核通过" ,"APPLICATION_SUCCESS") ,
    APPLICATION_REJECT("申请驳回" ,"APPLICATION_REJECT")
    ;

    private String name ;
    private String code ;
    TeacherApplicationStatusEnums(String name ,String code) {
        this.name = name ;
        this.code = code ;
    }

    public static String getNameByCode(String code) {
        for (TeacherApplicationStatusEnums value : values()) {
            if (value.getCode().equals(code)) {
                return value.getName() ;
            }
        }
        return "未知" ;
    }
}
